/*
 * @Description: 用户接口层
 * @Autor: HuiSir<273250950@qq.com>
 * @Date: 2020-11-10 16:30:00
 * @LastEditTime: 2020-11-10 18:23:53
 */
const Router = require('@koa/router')
const {
    Signup,
    Login,
    Logout,
    ResetPass,
    AllUser,
    OnlineUsers,
} = require('../services/user') //业务层

// 创建路由实例，设置前缀
const router = new Router({ prefix: '/api/user' })

// 注册路由接口
router
    .post('/signup', Signup)
    .post('/login', Login)
    .post('/logout', Logout)
    .post('/resetPass', ResetPass)
    .get('/allUser', AllUser)
    .get('/onlineUsers', OnlineUsers)

module.exports = router
